<template>
  <div style="
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;">
    <el-table
        :data="tableData"
        border
        style="width: 100%">
      <el-table-column
          label="学号"
          width=""
          align="center">
        <template slot-scope="scope">
          {{ scope.row.num }}
        </template>
      </el-table-column>
      <el-table-column
          label="姓名"
          width=""
          align="center">
        <template slot-scope="scope">
          {{ scope.row.name }}
        </template>
      </el-table-column>
      <el-table-column
          label="科目"
          width=""
          align="center">
        <template slot-scope="scope">
          {{ scope.row.course }}
        </template>
      </el-table-column>
      <el-table-column
          label="任课老师"
          width=""
          align="center">
        <template slot-scope="scope">
          {{ scope.row.teacher }}
        </template>
      </el-table-column>
      <el-table-column
          label="提交时间"
          width=""
          align="center">
        <template slot-scope="scope">
          {{ scope.row.timestamp }}
        </template>
      </el-table-column>
      <el-table-column
          label="提交情况"
          width=""
          align="center">
        <template slot-scope="scope">
          {{ scope.row.status }}
        </template>
      </el-table-column>

      <el-table-column
          label="得分"
          width=""
          align="center">
        <template slot-scope="scope">
          {{ scope.row.mark }}
        </template>
      </el-table-column>
      <el-table-column
          label="操作"
          align="center">
        <template slot-scope="scope">
          <el-button
              size="mini"
              type="primary"
              @click="handleEdit(scope.$index, scope.row)">编辑
          </el-button>
          <el-button
              size="mini"
              type="danger"
              @click="handleEdit(scope.$index, scope.row)">删除
          </el-button>
        </template>
      </el-table-column>
    </el-table>

    <el-dialog title="编辑提交文档" :visible.sync="dialogFormVisible">
      <el-form :model="form">
        <el-input v-model="form.index" autocomplete="off" v-show="false"></el-input>
        <el-input v-model="form.id" autocomplete="off" v-show="false"></el-input>
        <el-form-item label="学号" :label-width="formLabelWidth">
          <el-input v-model="form.num" autocomplete="off"></el-input>
        </el-form-item>
        <el-form-item label="姓名" :label-width="formLabelWidth">
          <el-input v-model="form.name" autocomplete="off"></el-input>
        </el-form-item>
        <el-form-item label="科目" :label-width="formLabelWidth">
          <el-input v-model="form.age" autocomplete="off"></el-input>
        </el-form-item>
        <el-form-item label="科目" :label-width="formLabelWidth">
          <el-input v-model="form.age" autocomplete="off"></el-input>
        </el-form-item>
        <el-form-item label="任课老师" :label-width="formLabelWidth">
          <el-input v-model="form.age" autocomplete="off"></el-input>
        </el-form-item>
        <el-form-item label="得分" :label-width="formLabelWidth">
          <el-input v-model="form.age" autocomplete="off"></el-input>
        </el-form-item>
        <el-form-item label="提交情况" :label-width="formLabelWidth">
          <el-radio-group v-model="form.status">
            <el-radio :label="'未审批'">未审批</el-radio>
            <el-radio :label="'已审批'">已审批</el-radio>
          </el-radio-group>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="dialogFormVisible = false">取 消</el-button>
        <el-button type="primary" @click="handleUpdateStudent()">确 定</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
export default {
  name: "ManageClass",

  data() {

    return {
      formLabelWidth: '213',
      dialogFormVisible: false,
      tableData: [{
        address: 1,
      }],
      formGrade: '1',
      form: {
        index: '',
        id: '',
        num: '',
        name: '',
        time: '',
        status: '',
        mark : '',
        course: ''
      }
    }
  },
}
</script>

<style scoped>

</style>